﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UnitTestIContainerConfigurationManagerImpl.cs" company="ELEN 7045 GROUP II">
//   Contributed by E.V.
// </copyright>
// <summary>
//   Container Configuration Manager Tests
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Infrastructure.CrossCutting.IoC.Tests
{
    using Infrastructure.CrossCutting.IoC;
    using Infrastructure.CrossCutting.IoC.Tests.TestObjects;

    using Microsoft.Practices.Unity;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    /// <summary>
    /// Container Configuration Manager Tests
    /// </summary>
    [TestClass]
    public class UnitTestIContainerConfigurationManagerImpl
    {
        /// <summary>
        /// Tests the Configuration Manager should configure container from separate file.
        /// </summary>
        [TestMethod, Description("Infrastructure.CrossCutting.IoC: ContainerConfigurationManager - Get a Configured Container")]
        public void TestShouldConfigureContainerFromSeparateFile()
        {
            IContainerConfigurationManager containerConfigurationManager = new ContainerConfigurationManager();
            var container = containerConfigurationManager.GetContainer("fakeContainerConfigurationFile");

            Assert.IsInstanceOfType(container.Resolve<ISomeInterface>(), typeof(SomeImplementation));
        }
    }
}
